import request from '@/utils/request'

// 字典列表
export const getDictList = (params) => {
  return request({
    method: 'get',
    url: '/system/dictionary/query',
    params: params,
  })
}
// 字典详情
export const getDictDetail = (params) => {
  return request({
    method: 'get',
    url: '/system/dictionary/get',
    params: params,
  })
}
// 新增字典
export const dictAdd = (params) => {
  return request({
    method: 'post',
    url: '/system/dictionary/add',
    data: params,
  })
}
// 编辑字典
export const dictEdit = (pkid, params) => {
  return request({
    method: 'put',
    url: `/system/dictionary/update/${pkid}`,
    data: params,
  })
}
// 删除字典
export const dictDelete = (params) => {
  return request({
    method: 'delete',
    url: '/system/dictionary/delete',
    params: params,
  })
}
// 字典列表
export const getAllDict = (params) => {
  return request({
    method: 'get',
    url: '/system/dictionary/value/query',
    params: params,
  })
}
